package com.etc.cloud.service.impl;

import com.etc.cloud.dao.PaymentDao;
import com.etc.cloud.entityes.Payment;
import com.etc.cloud.service.PaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author kalista
 * @Description
 * @Date 2020/8/16  14:53
 **/
@Service
public class  PaymentServiceImpl implements PaymentService {

    @Autowired
    private PaymentDao paymentDao;

    @Override
    public int create(Payment payment) {
        int i = paymentDao.create(payment);
        System.out.println(payment.getId());
        return i ;
    }

    @Override
    public Payment getPaymentById(Long id) {
        return paymentDao.getPaymentById(id);
    }
}
